<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:84:"D:\wwwroot\fangcms_city_add\public/../application/manage\view\setting\site_edit.html";i:1493803248;s:80:"D:\wwwroot\fangcms_city_add\public/../application/manage\view\public\header.html";i:1490355172;s:80:"D:\wwwroot\fangcms_city_add\public/../application/manage\view\public\footer.html";i:1474280020;}*/ ?>
<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<link href="__CSS__/style.css" rel="stylesheet"/>
	<title>管理中心</title>

</head>

<body>
<div id="J_ajax_loading" class="ajax_loading">加载中...</div>

<div class="subnav">
    <div class="content_menu ib_a blue line_x">
        <?php if(!empty($sub_menu) OR !empty($big_menu)): if(!(empty($big_menu) || (($big_menu instanceof \think\Collection || $big_menu instanceof \think\Paginator ) && $big_menu->isEmpty()))): if(isset($normal)): ?>
        <a class="add fb" href="<?php echo $big_menu['iframe']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php else: ?>
    	<a class="add fb J_showdialog" href="javascript:void(0);" data-uri="<?php echo $big_menu['iframe']; ?>" data-title="<?php echo $big_menu['title']; ?>" data-id="<?php echo $big_menu['id']; ?>" data-width="<?php echo $big_menu['width']; ?>" data-height="<?php echo $big_menu['height']; ?>"><em><?php echo $big_menu['title']; ?></em></a>
        <?php endif; endif; if(!(empty($sub_menu) || (($sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator ) && $sub_menu->isEmpty()))): if(is_array($sub_menu) || $sub_menu instanceof \think\Collection || $sub_menu instanceof \think\Paginator): $key = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($key % 2 );++$key;if($key != 1): ?><span>|</span><?php endif; ?>
        <a href="<?php echo $val['url']; ?>" class="<?php echo $val['class']; ?>"><em><?php echo $val['name']; ?></em></a>
        <?php endforeach; endif; else: echo "" ;endif; endif; endif; ?>
    </div>
</div>

<style>
    .table_form td span{color:#fff;}
</style>
<!--网站设置-->
<div class="pad_lr_10">
    <div class="col_tab">
        <ul class="J_tabs tab_but cu_li">
            <li class="current">基本设置</li>
            <li>高级设置</li>
        </ul>

    <form id="info_form" action="<?php echo url('Setting/editDo'); ?>" method="post">
        <div class="J_panes">
            <div class="content_list pad_10">
                <table width="100%" class="table_form">
                    <tr>
                        <th>网站状态 :</th>
                        <td>
                            <label><input type="radio" value="1" name="data[status]" <?php if($info['status'] == 1): ?>checked<?php endif; ?>>开启</label>
                            <label><input type="radio" value="0" name="data[status]" <?php if($info['status'] == 0): ?>checked<?php endif; ?>>关闭</label>
                        </td>
                    </tr>
                    <tr id="tr-reson" <?php if($info['status'] == 1): ?>style="display:none;"<?php endif; ?>>
                        <th>关闭原因 :</th>
                        <td>
                            <textarea name="data[reson]" id="reson" style="width:500px;height:50px;"><?php echo $info['reson']; ?></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th width="150">站点名称 :</th>
                        <td><input type="text" name="data[title]" class="input-text" size="50" value="<?php echo $info['title']; ?>"></td>
                    </tr>
                    <tr>
                        <th>电脑版logo :</th>
                        <td><?php if(!(empty($info['pcLogo']) || (($info['pcLogo'] instanceof \think\Collection || $info['pcLogo'] instanceof \think\Paginator ) && $info['pcLogo']->isEmpty()))): ?>
                            <div>
                                <img src="<?php echo $info['pcLogo']; ?>" alt="" id="J_pc_img_src">
                            </div>
                            <?php endif; ?>
                            <input type="hidden" name="data[pcLogo]" id="J_pc_img" class="input-text fl mr10" value="<?php echo $info['pcLogo']; ?>" size="50">
                            <div id="J_pc_upload_img" class="btn btn_submit" onclick="ajaxUpload('J_pc_upload_img','J_pc_img');"><span>上传</span></div>
                            图片尺寸：80*64
                        </td>
                    </tr>
                    <tr>
                        <th>手机版logo :</th>
                        <td>
                            <?php if(!(empty($info['mobileLogo']) || (($info['mobileLogo'] instanceof \think\Collection || $info['mobileLogo'] instanceof \think\Paginator ) && $info['mobileLogo']->isEmpty()))): ?>
                            <div>
                                <img src="<?php echo $info['mobileLogo']; ?>" style="background-color: orange" alt="" id="J_mobile_img_src">
                            </div>
                            <?php endif; ?>
                            <input type="hidden" name="data[mobileLogo]" id="J_mobile_img" class="input-text fl mr10" value="<?php echo $info['mobileLogo']; ?>" size="50">
                            <div id="J_mobile_upload_img" class="btn btn_submit" onclick="ajaxUpload('J_mobile_upload_img','J_mobile_img');"><span>上传</span></div>
                            图片尺寸：160*43
                        </td>
                    </tr>
                    <tr>
                        <th>微信公众号二维码 :</th>
                        <td>
                            <?php if(!(empty($info['weixin_pic']) || (($info['weixin_pic'] instanceof \think\Collection || $info['weixin_pic'] instanceof \think\Paginator ) && $info['weixin_pic']->isEmpty()))): ?>
                            <div>
                                <img src="<?php echo $info['weixin_pic']; ?>" alt="" id="J_weixin_img_src" height="80">
                            </div>
                            <?php endif; ?>
                            <input type="hidden" name="data[weixin_pic]" id="J_weixin_img" class="input-text fl mr10" value="<?php echo $info['weixin_pic']; ?>" size="50">
                            <div id="J_weixin_upload_img" class="btn btn_submit" onclick="ajaxUpload('J_weixin_upload_img','J_weixin_img');"><span>上传</span></div>
                            图片尺寸：250*250
                        </td>
                    </tr>
                    <tr>
                        <th>备案号 :</th>
                        <td><input type="text" name="data[icp]" class="input-text" size="50" value="<?php echo $info['icp']; ?>"></td>
                    </tr>
                    <tr>
                        <th>客服电话 :</th>
                        <td><input type="text" name="data[telphone]" class="input-text" size="50" value="<?php echo $info['telphone']; ?>"></td>
                    </tr>
                    <tr>
                        <th>客服QQ :</th>
                        <td><input type="text" name="data[qq]" class="input-text" size="50" value="<?php echo $info['qq']; ?>"></td>
                    </tr>
                    <tr>
                        <th>楼盘红包 :</th>
                        <td>
                            <input type="radio" name="data[hongbao]" value="1" <?php if(isset($info['hongbao']) && ($info['hongbao'] == 1)): ?>checked<?php endif; ?>>开启
                            <input type="radio" name="data[hongbao]" value="0" <?php if(isset($info['hongbao']) && ($info['hongbao'] == 0)): ?>checked<?php endif; ?>>关闭
                        </td>
                    </tr>
                    <tr>
                        <th>提问审核 :</th>
                        <td>
                            <input type="radio" name="data[checkask]" value="1" <?php if(isset($info['checkask']) && ($info['checkask'] == 1)): ?>checked<?php endif; ?>>开启
                            <input type="radio" name="data[checkask]" value="0" <?php if(isset($info['checkask']) && ($info['checkask'] == 0)): ?>checked<?php endif; ?>>关闭
                        </td>
                    </tr>
                    <tr>
                        <th>回答审核 :</th>
                        <td>
                            <input type="radio" name="data[checkanswer]" value="1" <?php if(isset($info['checkanswer']) && ($info['checkanswer'] == 1)): ?>checked<?php endif; ?>>开启
                            <input type="radio" name="data[checkanswer]" value="0" <?php if(isset($info['checkanswer']) && ($info['checkanswer'] == 0)): ?>checked<?php endif; ?>>关闭
                        </td>
                    </tr>
                </table>

            </div>
            <div class="content_list pad_10 hidden">
                <table width="100%" class="table_form">
                    <tr>
                        <th width="150">企业名称 :</th>
                        <td><input type="text" name="data[companyname]" class="input-text" value="<?php echo $info['companyname']; ?>" size="40"></td>
                    </tr>
                    <tr>
                        <th>SEO 标题 :</th>
                        <td><input type="text" name="data[seo_title]" class="input-text" size="50" value="<?php echo $info['seo_title']; ?>"></td>
                    </tr>
                    <tr>
                        <th>SEO 关键词 :</th>
                        <td><input type="text" name="data[seo_keys]" class="input-text" size="50" value="<?php echo $info['seo_keys']; ?>"></td>
                    </tr>
                    <tr>
                        <th>SEO 描述 :</th>
                        <td><textarea rows="3" cols="50" name="data[seo_desc]"><?php echo $info['seo_desc']; ?></textarea></td>
                    </tr>
                    <tr>
                        <th></th>
                        <td style="color:#ff0000;">注：SEO设置中的{city}为变量，请不要删除或更改，在前台将自动替换为用户所选择的城市名称。</td>
                    </tr>
                    <tr>
                        <th>邮　　箱 :</th>
                        <td>
                            <input type="text" name="data[email]" class="input-text" value="<?php echo $info['email']; ?>" size="30">
                        </td>
                    </tr>

                    <tr>
                        <th>公司地址 :</th>
                        <td>
                            <textarea name="data[address]" id="" style="width:500px;height:100px;"><?php echo $info['address']; ?></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th>电脑版js代码 :</th>
                        <td>
                            <textarea name="data[countcode]" id="countcode" style="width:500px;height:100px;"><?php if(isset($info['countcode'])): ?><?php echo $info['countcode']; endif; ?></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th>手机版js代码 :</th>
                        <td>
                            <textarea name="data[mobileJs]" id="mobileJs" style="width:500px;height:100px;"><?php if(isset($info['mobileJs'])): ?><?php echo $info['mobileJs']; endif; ?></textarea>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <input type="hidden" name="name" value="<?php echo $action_name; ?>">
        <input type="hidden" name="id" value="<?php echo $base['id']; ?>">
        <div class="mt10"><input type="submit" value="提交" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>

    </form>
    </div>
</div>
<script src="__PUBLIC__/js/jquery.min.1.7.2.js"></script>
<script src="__JS__/manage.js"></script>
<script src="__JS__/admin.js"></script>
<script>
//初始化弹窗
(function (d) {
    d['okValue'] = '确定';
    d['cancelValue'] = '取消';
    d['title'] = '标题';
})($.dialog.defaults);
</script>
<script src="__PUBLIC__/js/plugins/formvalidator.js"></script>
<?php if(isset($list_table)): ?>
<script src="__PUBLIC__/js/plugins/listTable.js"></script>
<script>
$(function(){
	$('.J_tablelist').listTable();
});
</script>
<?php endif; ?>
<script src="__PUBLIC__/js/plugins/jquery.tools.min.js"></script>
<script src="__PUBLIC__/js/plugins/fileuploader.js"></script>
<script>
    $(function(){
        $('ul.J_tabs').tabs('div.J_panes > div');
        $("input[name='data[status]']").click(function(){
            var value = $(this).val();
            if(value == 1){
                $("#tr-reson").hide();
                $("#reson").val('');
            }else{
                $("#tr-reson").show();
            }
        });
    });
    function ajaxUpload(btn,input){
        //上传图片

        var img_uploader = new qq.FileUploaderBasic({
            allowedExtensions: ['jpg','gif','jpeg','png','swf'],
            button: document.getElementById(btn),
            multiple: false,
            action: "<?php echo url('Setting/ajaxUploadImg'); ?>",
            inputName: 'img',
            forceMultipart: true, //用$_FILES
            messages: {
                typeError: "{file} 文件类型不符合: {extensions}.",
                sizeError: "{file} 太大了, 最大不超过 {sizeLimit}.",
                minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.",
                emptyError: "{file} is empty, please select files again without it.",
                noFilesError: "No files to upload.",
                onLeave: "The files are being uploaded, if you leave now the upload will be cancelled."
            },
            showMessage: function(message){
                layer.msg(message,{icon:2});
            },
            onSubmit: function(id, fileName){
                $('#'+btn).addClass('btn_disabled').find('span').text('上传中，请稍候...');
            },
            onComplete: function(id, fileName, result){
                $('#'+btn).removeClass('btn_disabled').find('span').text('上传');
                if(result.status == '1'){
                    $('#'+input).val(result.data);
                    $('#'+input+'_src').attr('src',result.data);
                } else {
                    layer.msg(result.msg,{icon:2});
                }
            }
        });
    }
</script>
</body>
</html>